<?php
if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
require_once( "class_3d/CheckMode_3d.php" );
$gametype = intval(getvar("gametype"));
$chk = new CheckMode_3d($curruser['acl'], 1, $gametype);
$chk->checkShow3dPage();
unset($chk);
$tbl = $g_gametype_3d[$gametype]['en'];
$tblName = $g_gametype_3d[$gametype]['ch'];
$cmd = getvar("cmd");
$conf = new Config();
$id = intval(getvar("id"));
if (!$id)
{
    exit();
}
$myDB = new DB();
$sql = "SELECT state FROM lotto_{$tbl} WHERE id = {$id} LIMIT 1";
$result = $myDB->query($sql);
$row = mysql_fetch_array($result);
header("Cache-Control: no-cache, must-revalidate");
header("Content-Type: text/plain");
echo "{\"state\":\"" . $row[0] . "\"}";
exit();
?>